package my.test.memento.multibackup;

import my.test.memento.multistate.Memento;

import java.util.HashMap;

/**
 * @Author 许玉康
 * @Date 2019/9/30 8:51
 */
public class Caretaker {

    //容纳备忘录的容器
    private HashMap<String, Memento> menMap = new HashMap<>();

    public Memento getMemento(String index) {
        return menMap.get(index);
    }

    public void setMemento(String index, Memento memento) {
        this.menMap.put(index, memento);
    }
}
